
package Q461

/**
 * 韩明距离
 * @author 23737
 * @date 2022.5.12
 */
fun main(){
    println(Solution().hammingDistance(1, 4))
}

class Solution {
    fun hammingDistance(x: Int, y: Int): Int {
        return Integer.bitCount(x xor y)
    }
}